﻿using System;
using System.Collections.Generic;
using System.Collections;
using CE.Database;

/// <summary>
/// Summary description for HFPersonnelInfoDB
/// </summary>
/// 
namespace CE.HomeRefinance
{
    public class HFPersonnelInfoDB
    {
        public HFPersonnelInfoDB()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public Int64 Insert(HFPersonnelInfo personnelinfo)
        {
            MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocHFPersonnelInfoInsertUpdateSingleItem]";

            SortedList _sPara = new SortedList();

            #region Parameter
            _sPara.Add("@HFPersonnelId", personnelinfo.HFPersonnelId);
            _sPara.Add("@HFID", personnelinfo.HFID);
            _sPara.Add("@HFIsMainBorrower", personnelinfo.HFIsMainBorrower);
            _sPara.Add("@HFHasJointBorrower", personnelinfo.HFHasJointBorrower);
            _sPara.Add("@HFSalutation", personnelinfo.HFSalutation);
            _sPara.Add("@HFName", personnelinfo.HFName);
            _sPara.Add("@HFNationality", personnelinfo.HFNationality);
            _sPara.Add("@HFDOB", personnelinfo.HFDOB);
            _sPara.Add("@HFIdType", personnelinfo.HFIdType);
            _sPara.Add("@HFIdNo", personnelinfo.HFIdNo);
            //_sPara.Add("@HFIdIssDate", personnelinfo.HFIdIssDate);
            //_sPara.Add("@HFIdExpDate", personnelinfo.HFIdExpDate);
            //_sPara.Add("@HFIdIssCountry", personnelinfo.HFIdIssCountry);
            _sPara.Add("@HFGender", personnelinfo.HFGender);
            _sPara.Add("@HFMaritalStatus", personnelinfo.HFMaritalStatus);
            _sPara.Add("@HFNoOfDependents", personnelinfo.HFNoOfDependents);
            _sPara.Add("@HFHighestEdu", personnelinfo.HFHighestEdu);
            _sPara.Add("@HFEmail", personnelinfo.HFEmail);
            _sPara.Add("@HFMobilePhoneNo", personnelinfo.HFMobilePhoneNo);
            _sPara.Add("@HFOfficePhoneNo", personnelinfo.HFOfficePhoneNo);
            _sPara.Add("@HFHomePhoneNo", personnelinfo.HFHomePhoneNo);
            _sPara.Add("@HFPostCode", personnelinfo.HFPostCode);
            _sPara.Add("@HFUnitNo", personnelinfo.HFUnitNo);
            _sPara.Add("@HFHomeNo", personnelinfo.HFHomeNo);
            _sPara.Add("@HFStreetName", personnelinfo.HFStreetName);
            _sPara.Add("@HFYearsThere", personnelinfo.HFYearsThere);
            _sPara.Add("@HFHasMailAddress", personnelinfo.HFHasMailAddress);
            _sPara.Add("@HFMailPostCode", personnelinfo.HFMailPostCode);
            _sPara.Add("@HFMailUnitNo", personnelinfo.HFMailUnitNo);
            _sPara.Add("@HFMailHomeNo", personnelinfo.HFMailHomeNo);
            _sPara.Add("@HFMailStreetName", personnelinfo.HFMailStreetName);
            _sPara.Add("@HFEmContactNo", personnelinfo.HFEmContactNo);
            _sPara.Add("@HFEmRelationship", personnelinfo.HFEmRelationship);
            _sPara.Add("@RefCEUserId", personnelinfo.RefCEUserId);
            _sPara.Add("@ViewedDetailId", personnelinfo.ViewedDetailId);
            _sPara.Add("@Status", personnelinfo.Status);
            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
        }

    }
}